$numberOfStars:300;
$numberOfShootingStars:6;

@use "sass:math";

.frame{
    position: absolute;
    inset: 0;
    margin: auto;
    width: 400px;
    height: 400px;
    box-shadow: 1px 2px 10px rgba(0,0,0,0.3);
    border-radius: 2px;
    background-color: #fff;
    overflow: hidden;
}

.stage{
    position: absolute;
    width: 280px;
    height: 280px;
    inset: 0;
    margin:auto;
    background: #1d4253;
    background: linear-gradient(to bottom, #1d4253 0%, #6bb5c4 100%);
    border-radius: 50%;
    overflow: hidden;
}

.star{
    position: absolute;
    width: 1px;
    height: 1px;
    border-radius: 1px;
    background-color: #fff;
}

@for $i from 1 through $numberOfStars{
    .star-#{$i}{
        top: random($limit: 280) + px;
        left: random($limit: 280) + px;
        animation: (math.div((random($limit: 20) + 20), 10)) + s 
                    flickr 
                    (math.div(random($limit: 20), -10)) + s 
                    infinite;
        
    }
}

.shooting-star{
    position: absolute;
    top: 0;
    left: -120px;
    width: 120px;
    height: 2px;
    background: url(https://100dayscss.com/codepen/shooting-star.png)
                center center no-repeat;
    background-size: 100% 100%;
    transform: rotate(20deg);
}

@for $i from 1 through $numberOfShootingStars{
    .shooting-star-#{$i}{
        top: (random($limit: 100) - 30) + px;
        animation: (random($limit: 5) + 20) + s
                    shooting-star
                    (math.div(random(250), 10)) + s infinite;
    }
}

@keyframes flickr{
    0%,100%{
        opacity: 1;
    }
    50%{
        opacity: 0.2;
    }
}

@keyframes shooting-star {
    0%{
        transform: translate3d(0,0,0) rotate(20deg);
    }
    10%,100%{
        transform: translate3d(451px, 164px, 0) rotate(20deg);
    }
}